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

Side by Side Diff: chrome/browser/extensions/extension_browsertests_misc.cc

Issue 196015: Try again to fix bug 20968, this time not breaking browser (Closed)
Patch Set: Created 11 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/ref_counted.h" 5 #include "base/ref_counted.h"
6 #include "chrome/browser/browser.h" 6 #include "chrome/browser/browser.h"
7 #include "chrome/browser/browser_list.h" 7 #include "chrome/browser/browser_list.h"
8 #include "chrome/browser/renderer_host/render_view_host.h" 8 #include "chrome/browser/renderer_host/render_view_host.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/extensions/extension_host.h" 10 #include "chrome/browser/extensions/extension_host.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 .AppendASCII("samples") 231 .AppendASCII("samples")
232 .AppendASCII("subscribe_page_action") 232 .AppendASCII("subscribe_page_action")
233 .AppendASCII("subscribe.html"); 233 .AppendASCII("subscribe.html");
234 subscribe = subscribe.StripTrailingSeparators(); 234 subscribe = subscribe.StripTrailingSeparators();
235 235
236 FilePath feed_dir = test_dir.AppendASCII("feeds") 236 FilePath feed_dir = test_dir.AppendASCII("feeds")
237 .AppendASCII(feed_page.c_str()); 237 .AppendASCII(feed_page.c_str());
238 238
239 return GURL(net::FilePathToFileURL(subscribe).spec() + 239 return GURL(net::FilePathToFileURL(subscribe).spec() +
240 std::string("?") + 240 std::string("?") +
241 net::FilePathToFileURL(feed_dir).spec()); 241 net::FilePathToFileURL(feed_dir).spec() +
242 "&synchronous"); // synchronous XHR for easier testing.
242 } 243 }
243 244
244 static const wchar_t* jscript_feed_title = 245 static const wchar_t* jscript_feed_title =
245 L"window.domAutomationController.send(" 246 L"window.domAutomationController.send("
246 L" document.getElementById('title') ? " 247 L" document.getElementById('title') ? "
247 L" document.getElementById('title').textContent : " 248 L" document.getElementById('title').textContent : "
248 L" \"element 'title' not found\"" 249 L" \"element 'title' not found\""
249 L");"; 250 L");";
250 static const wchar_t* jscript_anchor = 251 static const wchar_t* jscript_anchor =
251 L"window.domAutomationController.send(" 252 L"window.domAutomationController.send("
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 browser(), 568 browser(),
568 GURL("about:blank"), 569 GURL("about:blank"),
569 "chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/newtab.html"); 570 "chrome-extension://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/newtab.html");
570 571
571 // Extension API should fail. 572 // Extension API should fail.
572 bool result = false; 573 bool result = false;
573 ui_test_utils::ExecuteJavaScriptAndExtractBool( 574 ui_test_utils::ExecuteJavaScriptAndExtractBool(
574 newtab->render_view_host(), L"", L"testExtensionApi()", &result); 575 newtab->render_view_host(), L"", L"testExtensionApi()", &result);
575 EXPECT_FALSE(result); 576 EXPECT_FALSE(result);
576 } 577 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698