Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/webui/web_ui_browsertest.h" | 10 #include "chrome/browser/ui/webui/web_ui_browsertest.h" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 TestTabStripModelObserver tabstrip_observer(browser->tabstrip_model(), | 26 TestTabStripModelObserver tabstrip_observer(browser->tabstrip_model(), |
| 27 load_start_observer); | 27 load_start_observer); |
| 28 TabContents* initiator_tab_contents = browser->GetSelectedTabContents(); | 28 TabContents* initiator_tab_contents = browser->GetSelectedTabContents(); |
| 29 browser->Print(); | 29 browser->Print(); |
| 30 tabstrip_observer.WaitForObservation(); | 30 tabstrip_observer.WaitForObservation(); |
| 31 EXPECT_NE(initiator_tab_contents, browser->GetSelectedTabContents()); | 31 EXPECT_NE(initiator_tab_contents, browser->GetSelectedTabContents()); |
| 32 } | 32 } |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 // crbug.com/88104 - v8_shell#host doesn't build when host=="arm". | |
| 37 #if !defined(ARCH_CPU_ARM_FAMILY) | |
|
Lei Zhang
2011/07/07 01:27:24
This should be #if defined(ARCH_CPU_X86_FAMILY). I
Sheridan Rawlins
2011/07/07 04:45:33
See crbug.com/88104 - this only doesn't compile v8
Lei Zhang
2011/07/07 05:17:53
I don't understand your reasoning. ARCH_CPU_X86_FA
Sheridan Rawlins
2011/07/07 07:01:55
Will ARCH_CPU_X86_FAMILY be defined for mac? for
Lei Zhang
2011/07/07 19:16:57
Sure, let's leave it as is then. We probably won't
| |
| 38 | |
| 36 class PrintPreviewWebUITest | 39 class PrintPreviewWebUITest |
| 37 : public WebUIBrowserTest, | 40 : public WebUIBrowserTest, |
| 38 public TestTabStripModelObserver::LoadStartObserver { | 41 public TestTabStripModelObserver::LoadStartObserver { |
| 39 protected: | 42 protected: |
| 40 // WebUIBrowserTest: | 43 // WebUIBrowserTest: |
| 41 virtual void SetUpOnMainThread() OVERRIDE { | 44 virtual void SetUpOnMainThread() OVERRIDE { |
| 42 WebUIBrowserTest::SetUpOnMainThread(); | 45 WebUIBrowserTest::SetUpOnMainThread(); |
| 43 if (!HasPDFLib()) | 46 if (!HasPDFLib()) |
| 44 skipTest(base::StringPrintf("%s:%d: No PDF Lib.", __FILE__, __LINE__)); | 47 skipTest(base::StringPrintf("%s:%d: No PDF Lib.", __FILE__, __LINE__)); |
| 45 | 48 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 65 PreLoadJavascriptLibraries(true); | 68 PreLoadJavascriptLibraries(true); |
| 66 } | 69 } |
| 67 | 70 |
| 68 bool HasPDFLib() const { | 71 bool HasPDFLib() const { |
| 69 FilePath pdf; | 72 FilePath pdf; |
| 70 return PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && | 73 return PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && |
| 71 file_util::PathExists(pdf); | 74 file_util::PathExists(pdf); |
| 72 } | 75 } |
| 73 }; | 76 }; |
| 74 | 77 |
| 75 IN_PROC_BROWSER_TEST_F(PrintPreviewWebUITest, FLAKY_TestPrintPreview) { | 78 #include "chrome/test/data/webui/print_preview-inl.h" |
|
Lei Zhang
2011/07/07 01:27:24
This is the dynamically generated test list?
Sheridan Rawlins
2011/07/07 04:45:33
Yes. The test is generated from any functions in
Lei Zhang
2011/07/07 05:17:53
Then it should go into out/{Release,Debug} or it's
Sheridan Rawlins
2011/07/07 07:01:55
It does go there. Please see http://codereview.ch
Lei Zhang
2011/07/07 19:16:57
Let's just make the #include obvious that it's a g
Sheridan Rawlins
2011/07/07 20:30:54
Done.
| |
| 76 ASSERT_TRUE(RunJavascriptTest("testPrintPreview", | 79 |
| 77 *Value::CreateBooleanValue(HasPDFLib()))); | 80 #endif // !defined(ARCH_CPU_ARM_FAMILY) |
| 78 } | |
| OLD | NEW |