Commit 0fbe6af5 authored by dcheng's avatar dcheng Committed by Commit bot

Remove stylesheet injection bindings for test runner.

BUG=

Review URL: https://codereview.chromium.org/1052123002

Cr-Commit-Position: refs/heads/master@{#323878}
parent 930aa4b0
......@@ -187,7 +187,6 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
bool allow_destination_subdomains);
bool HasCustomPageSizeStyle(int page_index);
void ForceRedSelectionColors();
void InjectStyleSheet(const std::string& source_code, bool all_frames);
void InsertStyleSheet(const std::string& source_code);
bool FindString(const std::string& search_text,
const std::vector<std::string>& options_array);
......@@ -395,7 +394,6 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
&TestRunnerBindings::HasCustomPageSizeStyle)
.SetMethod("forceRedSelectionColors",
&TestRunnerBindings::ForceRedSelectionColors)
.SetMethod("injectStyleSheet", &TestRunnerBindings::InjectStyleSheet)
.SetMethod("insertStyleSheet", &TestRunnerBindings::InsertStyleSheet)
.SetMethod("findString", &TestRunnerBindings::FindString)
.SetMethod("selectionAsMarkup", &TestRunnerBindings::SelectionAsMarkup)
......@@ -797,12 +795,6 @@ void TestRunnerBindings::ForceRedSelectionColors() {
runner_->ForceRedSelectionColors();
}
void TestRunnerBindings::InjectStyleSheet(const std::string& source_code,
bool all_frames) {
if (runner_)
runner_->InjectStyleSheet(source_code, all_frames);
}
void TestRunnerBindings::InsertStyleSheet(const std::string& source_code) {
if (runner_)
runner_->InsertStyleSheet(source_code);
......@@ -1621,7 +1613,6 @@ void TestRunner::Reset() {
web_view_->setSelectionColors(
0xff1e90ff, 0xff000000, 0xffc8c8c8, 0xff323232);
#endif
web_view_->removeInjectedStyleSheets();
web_view_->setVisibilityState(WebPageVisibilityStateVisible, true);
web_view_->mainFrame()->enableViewSourceMode(false);
......@@ -2273,15 +2264,6 @@ void TestRunner::ForceRedSelectionColors() {
web_view_->setSelectionColors(0xffee0000, 0xff00ee00, 0xff000000, 0xffc0c0c0);
}
void TestRunner::InjectStyleSheet(const std::string& source_code,
bool all_frames) {
WebView::injectStyleSheet(
WebString::fromUTF8(source_code),
WebVector<WebString>(),
all_frames ? WebView::InjectStyleInAllFrames
: WebView::InjectStyleInTopFrameOnly);
}
void TestRunner::InsertStyleSheet(const std::string& source_code) {
WebLocalFrame::frameForCurrentContext()->document().insertStyleSheet(
WebString::fromUTF8(source_code));
......
......@@ -243,10 +243,6 @@ class TestRunner : public WebTestRunner,
// Forces the selection colors for testing under Linux.
void ForceRedSelectionColors();
// Adds a style sheet to be injected into new documents.
// TODO(dcheng): This will be removed in a followup patch.
void InjectStyleSheet(const std::string& source_code, bool all_frames);
// Add |source_code| as an injected stylesheet to the active document of the
// window of the current V8 context.
void InsertStyleSheet(const std::string& source_code);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment