Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "chrome/browser/ui/views/webshare/webshare_target_picker_view.h" | 5 #include "chrome/browser/ui/views/webshare/webshare_target_picker_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/optional.h" | 12 #include "base/optional.h" |
| 13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" | 16 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" |
| 17 #include "chrome/test/base/browser_with_test_window_test.h" | 17 #include "chrome/test/base/browser_with_test_window_test.h" |
| 18 #include "components/constrained_window/constrained_window_views.h" | 18 #include "components/constrained_window/constrained_window_views.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 #include "ui/views/controls/table/table_view.h" | 20 #include "ui/views/controls/table/table_view.h" |
| 21 #include "ui/views/test/views_test_base.h" | 21 #include "ui/views/test/views_test_base.h" |
| 22 #include "ui/views/widget/widget.h" | 22 #include "ui/views/widget/widget.h" |
| 23 #include "ui/views/window/dialog_client_view.h" | 23 #include "ui/views/window/dialog_client_view.h" |
| 24 #include "ui/views/window/dialog_delegate.h" | 24 #include "ui/views/window/dialog_delegate.h" |
| 25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 26 | 26 |
| 27 namespace { | 27 namespace test { |
|
Lei Zhang
2017/02/25 00:50:34
Just remove the namespace?
Tom (Use chromium acct)
2017/02/25 01:40:21
Done.
| |
| 28 | 28 |
| 29 class WebShareTargetPickerViewTest : public views::ViewsTestBase { | 29 class WebShareTargetPickerViewTest : public views::ViewsTestBase { |
| 30 public: | 30 public: |
| 31 WebShareTargetPickerViewTest() {} | 31 WebShareTargetPickerViewTest() {} |
| 32 | 32 |
| 33 void SetUp() override { | 33 void SetUp() override { |
| 34 ViewsTestBase::SetUp(); | 34 ViewsTestBase::SetUp(); |
| 35 | 35 |
| 36 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); | 36 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); |
| 37 | 37 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 163 SetQuitClosure(run_loop.QuitClosure()); | 163 SetQuitClosure(run_loop.QuitClosure()); |
| 164 | 164 |
| 165 view()->OnDoubleClick(); | 165 view()->OnDoubleClick(); |
| 166 | 166 |
| 167 run_loop.Run(); | 167 run_loop.Run(); |
| 168 | 168 |
| 169 EXPECT_EQ(base::Optional<std::string>("https://appone.com/path/bits"), | 169 EXPECT_EQ(base::Optional<std::string>("https://appone.com/path/bits"), |
| 170 result()); | 170 result()); |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace | 173 } // namespace test |
| OLD | NEW |