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

Side by Side Diff: chrome/browser/errorpage_browsertest.cc

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 NavigateHistory(num_navigations, HISTORY_NAVIGATE_FORWARD); 350 NavigateHistory(num_navigations, HISTORY_NAVIGATE_FORWARD);
351 } 351 }
352 352
353 // Confirms that the javascript variable indicating whether or not we have 353 // Confirms that the javascript variable indicating whether or not we have
354 // a stale copy in the cache has been set to |expected|, and that the 354 // a stale copy in the cache has been set to |expected|, and that the
355 // stale load button is or isn't there based on the same expectation. 355 // stale load button is or isn't there based on the same expectation.
356 testing::AssertionResult ProbeStaleCopyValue(bool expected) { 356 testing::AssertionResult ProbeStaleCopyValue(bool expected) {
357 const char* js_cache_probe = 357 const char* js_cache_probe =
358 "try {\n" 358 "try {\n"
359 " domAutomationController.send(\n" 359 " domAutomationController.send(\n"
360 " 'staleLoadButton' in templateData ? 'yes' : 'no');\n" 360 " loadTimeData.valueExists('staleLoadButton') ? 'yes' : 'no');\n"
361 "} catch (e) {\n" 361 "} catch (e) {\n"
362 " domAutomationController.send(e.message);\n" 362 " domAutomationController.send(e.message);\n"
363 "}\n"; 363 "}\n";
364 364
365 std::string result; 365 std::string result;
366 bool ret = 366 bool ret =
367 content::ExecuteScriptAndExtractString( 367 content::ExecuteScriptAndExtractString(
368 browser()->tab_strip_model()->GetActiveWebContents(), 368 browser()->tab_strip_model()->GetActiveWebContents(),
369 js_cache_probe, 369 js_cache_probe,
370 &result); 370 &result);
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 browser(), 1098 browser(),
1099 URLRequestFailedJob::GetMockHttpUrlForHostname(net::ERR_UNSAFE_PORT, 1099 URLRequestFailedJob::GetMockHttpUrlForHostname(net::ERR_UNSAFE_PORT,
1100 kHostname), 1100 kHostname),
1101 1); 1101 1);
1102 1102
1103 ToggleHelpBox(browser()); 1103 ToggleHelpBox(browser());
1104 EXPECT_TRUE(IsDisplayingText(browser(), kHostnameJSUnicode)); 1104 EXPECT_TRUE(IsDisplayingText(browser(), kHostnameJSUnicode));
1105 } 1105 }
1106 1106
1107 } // namespace 1107 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/signin/merge_session_load_page.cc ('k') | chrome/browser/resources/about_sys/about_sys.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698