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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 12036074: overscroll: Enable overscroll navigation by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge Created 7 years, 11 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 | Annotate | Revision Log
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 "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/test/test_timeouts.h" 9 #include "base/test/test_timeouts.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 RenderViewHost* screenshot_taken_for_; 59 RenderViewHost* screenshot_taken_for_;
60 NavigationControllerImpl* controller_; 60 NavigationControllerImpl* controller_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(ScreenshotTracker); 62 DISALLOW_COPY_AND_ASSIGN(ScreenshotTracker);
63 }; 63 };
64 64
65 class WebContentsViewAuraTest : public ContentBrowserTest { 65 class WebContentsViewAuraTest : public ContentBrowserTest {
66 public: 66 public:
67 WebContentsViewAuraTest() {} 67 WebContentsViewAuraTest() {}
68 68
69 virtual void SetUpCommandLine(CommandLine* command_line) {
70 command_line->AppendSwitch(switches::kEnableOverscrollHistoryNavigation);
71 }
72
73 // Executes the javascript synchronously and makes sure the returned value is 69 // Executes the javascript synchronously and makes sure the returned value is
74 // freed properly. 70 // freed properly.
75 void ExecuteSyncJSFunction(RenderViewHost* rvh, const std::string& jscript) { 71 void ExecuteSyncJSFunction(RenderViewHost* rvh, const std::string& jscript) {
76 scoped_ptr<base::Value> value = 72 scoped_ptr<base::Value> value =
77 content::ExecuteScriptAndGetValue(rvh, jscript); 73 content::ExecuteScriptAndGetValue(rvh, jscript);
78 } 74 }
79 75
80 // Starts the test server and navigates to the given url. Sets a large enough 76 // Starts the test server and navigates to the given url. Sets a large enough
81 // size to the root window. Returns after the navigation to the url is 77 // size to the root window. Returns after the navigation to the url is
82 // complete. 78 // complete.
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 web_contents->GetController().GetEntryAtOffset(-1)); 438 web_contents->GetController().GetEntryAtOffset(-1));
443 EXPECT_TRUE(entry->screenshot().get()); 439 EXPECT_TRUE(entry->screenshot().get());
444 440
445 entry = NavigationEntryImpl::FromNavigationEntry( 441 entry = NavigationEntryImpl::FromNavigationEntry(
446 web_contents->GetController().GetActiveEntry()); 442 web_contents->GetController().GetActiveEntry());
447 EXPECT_FALSE(entry->screenshot().get()); 443 EXPECT_FALSE(entry->screenshot().get());
448 } 444 }
449 } 445 }
450 446
451 } // namespace content 447 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698