OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/ref_counted.h" | 7 #include "base/ref_counted.h" |
8 #import "chrome/browser/cocoa/bug_report_window_controller.h" | 8 #import "chrome/browser/cocoa/bug_report_window_controller.h" |
9 #include "chrome/browser/chrome_thread.h" | 9 #include "chrome/browser/chrome_thread.h" |
10 #include "chrome/browser/renderer_host/site_instance.h" | 10 #include "chrome/browser/renderer_host/site_instance.h" |
11 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | 11 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
12 #include "chrome/browser/tab_contents/test_tab_contents.h" | 12 #include "chrome/browser/tab_contents/test_tab_contents.h" |
13 #include "chrome/browser/profile.h" | 13 #include "chrome/browser/profile.h" |
14 #include "chrome/test/testing_profile.h" | 14 #include "chrome/test/testing_profile.h" |
15 #import "testing/gtest_mac.h" | 15 #import "testing/gtest_mac.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 class BugReportWindowControllerUnittest : public RenderViewHostTestHarness { | 19 class BugReportWindowControllerUnittest : public RenderViewHostTestHarness { |
20 }; | 20 }; |
21 | 21 |
22 // See http://crbug.com/29019 for why it's disabled. | 22 // See http://crbug.com/29019 for why it's disabled. |
23 TEST_F(BugReportWindowControllerUnittest, DISABLED_ReportBugWithNewTabPageOpen)
{ | 23 TEST_F(BugReportWindowControllerUnittest, DISABLED_ReportBugWithNewTabPageOpen)
{ |
24 ChromeThread ui_thread(ChromeThread::UI, MessageLoop::current()); | 24 BrowserThread ui_thread(BrowserThread::UI, MessageLoop::current()); |
25 // Create a "chrome://newtab" test tab. SiteInstance will be deleted when | 25 // Create a "chrome://newtab" test tab. SiteInstance will be deleted when |
26 // tabContents is deleted. | 26 // tabContents is deleted. |
27 SiteInstance* instance = | 27 SiteInstance* instance = |
28 SiteInstance::CreateSiteInstance(profile_.get()); | 28 SiteInstance::CreateSiteInstance(profile_.get()); |
29 TestTabContents* tabContents = new TestTabContents(profile_.get(), | 29 TestTabContents* tabContents = new TestTabContents(profile_.get(), |
30 instance); | 30 instance); |
31 tabContents->controller().LoadURL(GURL("chrome://newtab"), | 31 tabContents->controller().LoadURL(GURL("chrome://newtab"), |
32 GURL(), PageTransition::START_PAGE); | 32 GURL(), PageTransition::START_PAGE); |
33 | 33 |
34 BugReportWindowController* controller = [[BugReportWindowController alloc] | 34 BugReportWindowController* controller = [[BugReportWindowController alloc] |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // that don't refer to a specific page should be available, and the send | 69 // that don't refer to a specific page should be available, and the send |
70 // screenshot option should be turned off. | 70 // screenshot option should be turned off. |
71 EXPECT_EQ([[controller bugTypeList] count], 4U); | 71 EXPECT_EQ([[controller bugTypeList] count], 4U); |
72 EXPECT_FALSE([controller sendScreenshot]); | 72 EXPECT_FALSE([controller sendScreenshot]); |
73 | 73 |
74 [controller release]; | 74 [controller release]; |
75 } | 75 } |
76 | 76 |
77 } // namespace | 77 } // namespace |
78 | 78 |
OLD | NEW |