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

Unified Diff: chrome/browser/ui/pdf/pdf_browsertest.cc

Issue 10828380: Convert the pdf PerformPDFAction pyauto test to a browser test. While at it, verify that… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/pdf/pdf_browsertest.cc
===================================================================
--- chrome/browser/ui/pdf/pdf_browsertest.cc (revision 152182)
+++ chrome/browser/ui/pdf/pdf_browsertest.cc (working copy)
@@ -344,6 +344,37 @@
}
}
+IN_PROC_BROWSER_TEST_F(PDFBrowserTest, Action) {
+ ASSERT_NO_FATAL_FAILURE(Load());
+
+ ASSERT_TRUE(content::ExecuteJavaScript(
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
+ std::wstring(),
+ L"document.getElementsByName('plugin')[0].fitToHeight();"));
+
+ std::string zoom1, zoom2;
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
+ std::wstring(),
+ L"window.domAutomationController.send("
+ L"document.getElementsByName('plugin')[0].getZoomLevel().toString())",
+ &zoom1));
+
+ ASSERT_TRUE(content::ExecuteJavaScript(
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
+ std::wstring(),
+ L"document.getElementsByName('plugin')[0].fitToWidth();"));
+
+ ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString(
+ chrome::GetActiveWebContents(browser())->GetRenderViewHost(),
+ std::wstring(),
+ L"window.domAutomationController.send("
+ L"document.getElementsByName('plugin')[0].getZoomLevel().toString())",
+ &zoom2));
+ ASSERT_NE(zoom1, zoom2);
cevans 2012/08/18 00:51:55 Is the width/height of the browser window sufficie
jam 2012/08/18 00:57:05 Load() resizes the browser to 1000x600 and ensures
+}
+
+
// Flaky as per http://crbug.com/74549.
IN_PROC_BROWSER_TEST_F(PDFBrowserTest, DISABLED_OnLoadAndReload) {
ASSERT_TRUE(pdf_test_server()->Start());
« no previous file with comments | « no previous file | chrome/test/functional/PYAUTO_TESTS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698