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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/dom_distiller/tab_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/guid.h" 8 #include "base/guid.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 EXPECT_CALL(*distiller_factory_, CreateDistillerImpl()) 248 EXPECT_CALL(*distiller_factory_, CreateDistillerImpl())
249 .WillOnce(testing::Return(distiller)); 249 .WillOnce(testing::Return(distiller));
250 250
251 // Setup observer to inspect the RenderViewHost after committed navigation. 251 // Setup observer to inspect the RenderViewHost after committed navigation.
252 content::WebContents* contents = 252 content::WebContents* contents =
253 browser()->tab_strip_model()->GetActiveWebContents(); 253 browser()->tab_strip_model()->GetActiveWebContents();
254 254
255 // Navigate to a URL and wait for the distiller to flush contents to the page. 255 // Navigate to a URL and wait for the distiller to flush contents to the page.
256 GURL url(dom_distiller::url_utils::GetDistillerViewUrlFromUrl( 256 GURL url(dom_distiller::url_utils::GetDistillerViewUrlFromUrl(
257 kDomDistillerScheme, GURL("http://urlthatlooksvalid.com"))); 257 kDomDistillerScheme, GURL("http://urlthatlooksvalid.com")));
258 chrome::NavigateParams params(browser(), url, content::PAGE_TRANSITION_TYPED); 258 chrome::NavigateParams params(browser(), url, ui::PAGE_TRANSITION_TYPED);
259 chrome::Navigate(&params); 259 chrome::Navigate(&params);
260 distillation_done_runner->Run(); 260 distillation_done_runner->Run();
261 261
262 // Fake a multi-page response from distiller. 262 // Fake a multi-page response from distiller.
263 263
264 std::vector<scoped_refptr<ArticleDistillationUpdate::RefCountedPageProto> > 264 std::vector<scoped_refptr<ArticleDistillationUpdate::RefCountedPageProto> >
265 update_pages; 265 update_pages;
266 scoped_ptr<DistilledArticleProto> article(new DistilledArticleProto()); 266 scoped_ptr<DistilledArticleProto> article(new DistilledArticleProto());
267 267
268 // Flush page 1. 268 // Flush page 1.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 EXPECT_EQ("dark sans-serif", result); 355 EXPECT_EQ("dark sans-serif", result);
356 356
357 distilled_page_prefs->SetFontFamily(DistilledPagePrefs::SERIF); 357 distilled_page_prefs->SetFontFamily(DistilledPagePrefs::SERIF);
358 base::RunLoop().RunUntilIdle(); 358 base::RunLoop().RunUntilIdle();
359 EXPECT_TRUE( 359 EXPECT_TRUE(
360 content::ExecuteScriptAndExtractString(contents, kGetBodyClass, &result)); 360 content::ExecuteScriptAndExtractString(contents, kGetBodyClass, &result));
361 EXPECT_EQ("dark serif", result); 361 EXPECT_EQ("dark serif", result);
362 } 362 }
363 363
364 } // namespace dom_distiller 364 } // namespace dom_distiller
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/dom_distiller/tab_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698