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

Side by Side Diff: content/browser/web_contents/aura/overscroll_navigation_overlay_unittest.cc

Issue 2225343002: Navigation: move RestoreType and ReloadType into a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [rebase] Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/aura/overscroll_navigation_overlay.h" 5 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 22 matching lines...) Expand all
33 33
34 // Forces web contents to complete web page load as soon as navigation starts. 34 // Forces web contents to complete web page load as soon as navigation starts.
35 class ImmediateLoadObserver : WebContentsObserver { 35 class ImmediateLoadObserver : WebContentsObserver {
36 public: 36 public:
37 explicit ImmediateLoadObserver(TestWebContents* contents) 37 explicit ImmediateLoadObserver(TestWebContents* contents)
38 : contents_(contents) { 38 : contents_(contents) {
39 Observe(contents); 39 Observe(contents);
40 } 40 }
41 ~ImmediateLoadObserver() override {} 41 ~ImmediateLoadObserver() override {}
42 42
43 void DidStartNavigationToPendingEntry( 43 void DidStartNavigationToPendingEntry(const GURL& url,
44 const GURL& url, 44 ReloadType reload_type) override {
45 NavigationController::ReloadType reload_type) override {
46 // Simulate immediate web page load. 45 // Simulate immediate web page load.
47 contents_->TestSetIsLoading(false); 46 contents_->TestSetIsLoading(false);
48 Observe(nullptr); 47 Observe(nullptr);
49 } 48 }
50 49
51 private: 50 private:
52 TestWebContents* contents_; 51 TestWebContents* contents_;
53 52
54 DISALLOW_COPY_AND_ASSIGN(ImmediateLoadObserver); 53 DISALLOW_COPY_AND_ASSIGN(ImmediateLoadObserver);
55 }; 54 };
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 EXPECT_TRUE(GetOverlay()->window_.get()); 440 EXPECT_TRUE(GetOverlay()->window_.get());
442 441
443 // Load the page. 442 // Load the page.
444 contents()->CommitPendingNavigation(); 443 contents()->CommitPendingNavigation();
445 ReceivePaintUpdate(); 444 ReceivePaintUpdate();
446 EXPECT_FALSE(GetOverlay()->window_.get()); 445 EXPECT_FALSE(GetOverlay()->window_.get());
447 EXPECT_EQ(contents()->GetURL(), first()); 446 EXPECT_EQ(contents()->GetURL(), first());
448 } 447 }
449 448
450 } // namespace content 449 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_unittest.cc ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698