Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Unified Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 1052123002: Remove stylesheet injection bindings for test runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/test_runner.cc
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index 9f6fceab942753885b858be5359b868ea84577be..ff9ecb3417c823fe14007f13318b0f0434b05ef3 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -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));
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698