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

Side by Side Diff: chrome/browser/dom_distiller/tab_utils_browsertest.cc

Issue 625113002: replace OVERRIDE and FINAL with override and final in chrome/browser/[a-i]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix newly added OVERRIDEs 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 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 <string.h> 5 #include <string.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" 9 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
10 #include "chrome/browser/dom_distiller/tab_utils.h" 10 #include "chrome/browser/dom_distiller/tab_utils.h"
(...skipping 14 matching lines...) Expand all
25 #include "testing/gtest/include/gtest/gtest.h" 25 #include "testing/gtest/include/gtest/gtest.h"
26 26
27 namespace dom_distiller { 27 namespace dom_distiller {
28 28
29 namespace { 29 namespace {
30 const char* kSimpleArticlePath = "/dom_distiller/simple_article.html"; 30 const char* kSimpleArticlePath = "/dom_distiller/simple_article.html";
31 } // namespace 31 } // namespace
32 32
33 class DomDistillerTabUtilsBrowserTest : public InProcessBrowserTest { 33 class DomDistillerTabUtilsBrowserTest : public InProcessBrowserTest {
34 public: 34 public:
35 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 35 virtual void SetUpCommandLine(CommandLine* command_line) override {
36 command_line->AppendSwitch(switches::kEnableDomDistiller); 36 command_line->AppendSwitch(switches::kEnableDomDistiller);
37 } 37 }
38 }; 38 };
39 39
40 class WebContentsMainFrameHelper : public content::WebContentsObserver { 40 class WebContentsMainFrameHelper : public content::WebContentsObserver {
41 public: 41 public:
42 WebContentsMainFrameHelper(content::WebContents* web_contents, 42 WebContentsMainFrameHelper(content::WebContents* web_contents,
43 const base::Closure& callback) 43 const base::Closure& callback)
44 : callback_(callback) { 44 : callback_(callback) {
45 content::WebContentsObserver::Observe(web_contents); 45 content::WebContentsObserver::Observe(web_contents);
46 } 46 }
47 47
48 virtual void DidFinishLoad(content::RenderFrameHost* render_frame_host, 48 virtual void DidFinishLoad(content::RenderFrameHost* render_frame_host,
49 const GURL& validated_url) OVERRIDE { 49 const GURL& validated_url) override {
50 if (!render_frame_host->GetParent() && 50 if (!render_frame_host->GetParent() &&
51 validated_url.scheme() == kDomDistillerScheme) 51 validated_url.scheme() == kDomDistillerScheme)
52 callback_.Run(); 52 callback_.Run();
53 } 53 }
54 54
55 private: 55 private:
56 base::Closure callback_; 56 base::Closure callback_;
57 }; 57 };
58 58
59 IN_PROC_BROWSER_TEST_F(DomDistillerTabUtilsBrowserTest, TestSwapWebContents) { 59 IN_PROC_BROWSER_TEST_F(DomDistillerTabUtilsBrowserTest, TestSwapWebContents) {
(...skipping 20 matching lines...) Expand all
80 80
81 // Verify the new URL is showing distilled content in a new WebContents. 81 // Verify the new URL is showing distilled content in a new WebContents.
82 EXPECT_NE(initial_web_contents, after_web_contents); 82 EXPECT_NE(initial_web_contents, after_web_contents);
83 EXPECT_TRUE( 83 EXPECT_TRUE(
84 after_web_contents->GetLastCommittedURL().SchemeIs(kDomDistillerScheme)); 84 after_web_contents->GetLastCommittedURL().SchemeIs(kDomDistillerScheme));
85 EXPECT_EQ("Test Page Title", 85 EXPECT_EQ("Test Page Title",
86 base::UTF16ToUTF8(after_web_contents->GetTitle())); 86 base::UTF16ToUTF8(after_web_contents->GetTitle()));
87 } 87 }
88 88
89 } // namespace dom_distiller 89 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « chrome/browser/dom_distiller/tab_utils.cc ('k') | chrome/browser/domain_reliability/service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698