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

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 11734018: Revert 174880 due to compilation error in pdf_browsertest.cc (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1374/src/
Patch Set: Created 7 years, 12 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
Index: chrome/browser/policy/policy_browsertest.cc
===================================================================
--- chrome/browser/policy/policy_browsertest.cc (revision 174946)
+++ chrome/browser/policy/policy_browsertest.cc (working copy)
@@ -237,12 +237,12 @@
bool result = false;
EXPECT_TRUE(content::ExecuteJavaScriptAndExtractBool(
contents->GetRenderViewHost(),
- "",
- "var hasError = false;"
- "var error = document.getElementById('errorDetails');"
- "if (error)"
- " hasError = error.textContent.indexOf('Error 138') == 0;"
- "domAutomationController.send(hasError);",
+ std::wstring(),
+ L"var hasError = false;"
+ L"var error = document.getElementById('errorDetails');"
+ L"if (error)"
+ L" hasError = error.textContent.indexOf('Error 138') == 0;"
+ L"domAutomationController.send(hasError);",
&result));
EXPECT_TRUE(result);
}
@@ -291,10 +291,10 @@
bool result = false;
EXPECT_TRUE(content::ExecuteJavaScriptAndExtractBool(
contents->GetRenderViewHost(),
- "",
- "var canvas = document.createElement('canvas');"
- "var context = canvas.getContext('experimental-webgl');"
- "domAutomationController.send(context != null);",
+ std::wstring(),
+ L"var canvas = document.createElement('canvas');"
+ L"var context = canvas.getContext('experimental-webgl');"
+ L"domAutomationController.send(context != null);",
&result));
return result;
}
@@ -462,24 +462,24 @@
bool result = false;
EXPECT_TRUE(content::ExecuteJavaScriptAndExtractBool(
web_contents->GetRenderViewHost(),
- "",
- "function btest_initCompleted(url) {"
- " var img = new Image();"
- " img.src = url;"
- " img.onload = function() {"
- " domAutomationController.send(img.width * img.height > 0);"
- " };"
- " img.onerror = function() {"
- " domAutomationController.send(false);"
- " };"
- "}"
- "function setupCurrentScreenshot(url) {"
- " btest_initCompleted(url);"
- "}"
- "var img = document.getElementById("
- " 'current-screenshots-thumbnailDiv-0-image');"
- "if (img)"
- " btest_initCompleted(img.src);",
+ std::wstring(),
+ L"function btest_initCompleted(url) {"
+ L" var img = new Image();"
+ L" img.src = url;"
+ L" img.onload = function() {"
+ L" domAutomationController.send(img.width * img.height > 0);"
+ L" };"
+ L" img.onerror = function() {"
+ L" domAutomationController.send(false);"
+ L" };"
+ L"}"
+ L"function setupCurrentScreenshot(url) {"
+ L" btest_initCompleted(url);"
+ L"}"
+ L"var img = document.getElementById("
+ L" 'current-screenshots-thumbnailDiv-0-image');"
+ L"if (img)"
+ L" btest_initCompleted(img.src);",
&result));
EXPECT_EQ(enabled, result);
@@ -1717,17 +1717,17 @@
std::string text;
ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
contents->GetRenderViewHost(),
- "",
- "var nodes = document.querySelectorAll('body > pre');"
- "var result = '';"
- "for (var i = 0; i < nodes.length; ++i) {"
- " var text = nodes[i].innerHTML;"
- " if (text.indexOf('Histogram: Enterprise.Policies') === 0) {"
- " result = text;"
- " break;"
- " }"
- "}"
- "domAutomationController.send(result);",
+ std::wstring(),
+ L"var nodes = document.querySelectorAll('body > pre');"
+ L"var result = '';"
+ L"for (var i = 0; i < nodes.length; ++i) {"
+ L" var text = nodes[i].innerHTML;"
+ L" if (text.indexOf('Histogram: Enterprise.Policies') === 0) {"
+ L" result = text;"
+ L" break;"
+ L" }"
+ L"}"
+ L"domAutomationController.send(result);",
&text));
ASSERT_FALSE(text.empty());
const std::string kExpectedLabel =
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | chrome/browser/policy/policy_prefs_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698