OLD | NEW |
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 "components/web_modal/web_contents_modal_dialog_manager.h" | 5 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
| 9 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 #include "components/web_modal/single_web_contents_dialog_manager.h" | 11 #include "components/web_modal/single_web_contents_dialog_manager.h" |
11 #include "components/web_modal/test_web_contents_modal_dialog_manager_delegate.h
" | 12 #include "components/web_modal/test_web_contents_modal_dialog_manager_delegate.h
" |
12 #include "content/public/test/test_renderer_host.h" | 13 #include "content/public/test/test_renderer_host.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 namespace web_modal { | 16 namespace web_modal { |
16 | 17 |
17 // Tracks persistent state changes of the native WC-modal dialog manager. | 18 // Tracks persistent state changes of the native WC-modal dialog manager. |
18 class NativeManagerTracker { | 19 class NativeManagerTracker { |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 | 355 |
355 test_api->CloseAllDialogs(); | 356 test_api->CloseAllDialogs(); |
356 | 357 |
357 EXPECT_FALSE(delegate->web_contents_blocked()); | 358 EXPECT_FALSE(delegate->web_contents_blocked()); |
358 EXPECT_FALSE(manager->IsDialogActive()); | 359 EXPECT_FALSE(manager->IsDialogActive()); |
359 for (int i = 0; i < kWindowCount; i++) | 360 for (int i = 0; i < kWindowCount; i++) |
360 EXPECT_EQ(NativeManagerTracker::CLOSED, trackers[i].state_); | 361 EXPECT_EQ(NativeManagerTracker::CLOSED, trackers[i].state_); |
361 } | 362 } |
362 | 363 |
363 } // namespace web_modal | 364 } // namespace web_modal |
OLD | NEW |