| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/activity/public/activity.h" | 5 #include "athena/activity/public/activity.h" |
| 6 #include "athena/activity/public/activity_view_model.h" | 6 #include "athena/activity/public/activity_view_model.h" |
| 7 #include "athena/resource_manager/public/resource_manager.h" | 7 #include "athena/resource_manager/public/resource_manager.h" |
| 8 #include "athena/test/chrome/athena_browsertest.h" | 8 #include "athena/test/chrome/athena_browsertest.h" |
| 9 #include "athena/test/chrome/test_util.h" | 9 #include "athena/test/chrome/test_util.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "ui/compositor/compositor_switches.h" | 12 #include "ui/compositor/compositor_switches.h" |
| 13 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
| 14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
| 15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
| 16 | 16 |
| 17 namespace athena { | 17 namespace athena { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 // The test URL to navigate to. | 20 // The test URL to navigate to. |
| 21 const char kTestUrl[] = "chrome:about"; | 21 const char kTestUrl[] = "chrome:about"; |
| 22 } | 22 } |
| 23 | 23 |
| 24 // Need to override the test class to make the test always draw its content. | 24 // Need to override the test class to make the test always draw its content. |
| 25 class ContentProxyBrowserTest : public AthenaBrowserTest { | 25 class ContentProxyBrowserTest : public AthenaBrowserTest { |
| 26 public: | 26 public: |
| 27 ContentProxyBrowserTest() {} | 27 ContentProxyBrowserTest() {} |
| 28 virtual ~ContentProxyBrowserTest() {} | 28 ~ContentProxyBrowserTest() override {} |
| 29 | 29 |
| 30 // AthenaBrowserTest: | 30 // AthenaBrowserTest: |
| 31 virtual void SetUpCommandLine(CommandLine* command_line) override { | 31 void SetUpCommandLine(CommandLine* command_line) override { |
| 32 // Make sure that we draw the output - it's required for this test. | 32 // Make sure that we draw the output - it's required for this test. |
| 33 command_line->AppendSwitch(switches::kEnablePixelOutputInTests); | 33 command_line->AppendSwitch(switches::kEnablePixelOutputInTests); |
| 34 AthenaBrowserTest::SetUpCommandLine(command_line); | 34 AthenaBrowserTest::SetUpCommandLine(command_line); |
| 35 } | 35 } |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(ContentProxyBrowserTest); | 38 DISALLOW_COPY_AND_ASSIGN(ContentProxyBrowserTest); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 IN_PROC_BROWSER_TEST_F(ContentProxyBrowserTest, CreateContent) { | 41 IN_PROC_BROWSER_TEST_F(ContentProxyBrowserTest, CreateContent) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 activity1->SetCurrentState(Activity::ACTIVITY_VISIBLE); | 108 activity1->SetCurrentState(Activity::ACTIVITY_VISIBLE); |
| 109 test_util::WaitUntilIdle(); | 109 test_util::WaitUntilIdle(); |
| 110 DCHECK_EQ(activity1->GetCurrentState(), Activity::ACTIVITY_VISIBLE); | 110 DCHECK_EQ(activity1->GetCurrentState(), Activity::ACTIVITY_VISIBLE); |
| 111 | 111 |
| 112 DCHECK_EQ(activity1->GetActivityViewModel()->GetOverviewModeImage() | 112 DCHECK_EQ(activity1->GetActivityViewModel()->GetOverviewModeImage() |
| 113 .size().ToString(), | 113 .size().ToString(), |
| 114 gfx::Size().ToString()); | 114 gfx::Size().ToString()); |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace athena | 117 } // namespace athena |
| OLD | NEW |