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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui_unittest.cc

Issue 23815006: [Cleanup] rename WebContentsModalDialogManager::IsShowingDialog() to IsDialogActive() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/printing/print_preview_dialog_controller.h" 9 #include "chrome/browser/printing/print_preview_dialog_controller.h"
10 #include "chrome/browser/printing/print_preview_test.h" 10 #include "chrome/browser/printing/print_preview_test.h"
(...skipping 18 matching lines...) Expand all
29 base::RefCountedBytes* CreateTestData() { 29 base::RefCountedBytes* CreateTestData() {
30 const unsigned char blob1[] = 30 const unsigned char blob1[] =
31 "12346102356120394751634516591348710478123649165419234519234512349134"; 31 "12346102356120394751634516591348710478123649165419234519234512349134";
32 std::vector<unsigned char> preview_data(blob1, blob1 + sizeof(blob1)); 32 std::vector<unsigned char> preview_data(blob1, blob1 + sizeof(blob1));
33 return new base::RefCountedBytes(preview_data); 33 return new base::RefCountedBytes(preview_data);
34 } 34 }
35 35
36 bool IsShowingWebContentsModalDialog(WebContents* tab) { 36 bool IsShowingWebContentsModalDialog(WebContents* tab) {
37 WebContentsModalDialogManager* web_contents_modal_dialog_manager = 37 WebContentsModalDialogManager* web_contents_modal_dialog_manager =
38 WebContentsModalDialogManager::FromWebContents(tab); 38 WebContentsModalDialogManager::FromWebContents(tab);
39 return web_contents_modal_dialog_manager->IsShowingDialog(); 39 return web_contents_modal_dialog_manager->IsDialogActive();
40 } 40 }
41 41
42 } // namespace 42 } // namespace
43 43
44 class PrintPreviewUIUnitTest : public PrintPreviewTest { 44 class PrintPreviewUIUnitTest : public PrintPreviewTest {
45 public: 45 public:
46 PrintPreviewUIUnitTest(); 46 PrintPreviewUIUnitTest();
47 virtual ~PrintPreviewUIUnitTest(); 47 virtual ~PrintPreviewUIUnitTest();
48 48
49 protected: 49 protected:
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 cancel = false; 224 cancel = false;
225 preview_ui->GetCurrentPrintPreviewStatus(preview_ui_addr, kFirstRequestId, 225 preview_ui->GetCurrentPrintPreviewStatus(preview_ui_addr, kFirstRequestId,
226 &cancel); 226 &cancel);
227 EXPECT_TRUE(cancel); 227 EXPECT_TRUE(cancel);
228 228
229 cancel = true; 229 cancel = true;
230 preview_ui->GetCurrentPrintPreviewStatus(preview_ui_addr, kSecondRequestId, 230 preview_ui->GetCurrentPrintPreviewStatus(preview_ui_addr, kSecondRequestId,
231 &cancel); 231 &cancel);
232 EXPECT_FALSE(cancel); 232 EXPECT_FALSE(cancel);
233 } 233 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698