| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
| 7 #include "remoting/client/plugin/chromoting_plugin.h" | 7 #include "remoting/client/plugin/chromoting_plugin.h" |
| 8 #include "remoting/client/pepper/fake_browser.h" | 8 #include "remoting/client/pepper/fake_browser.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 ASSERT_EQ(NPERR_GENERIC_ERROR, result); | 72 ASSERT_EQ(NPERR_GENERIC_ERROR, result); |
| 73 | 73 |
| 74 // Test "src" argument. | 74 // Test "src" argument. |
| 75 argc = 1; | 75 argc = 1; |
| 76 argn[0] = const_cast<char*>("src"); | 76 argn[0] = const_cast<char*>("src"); |
| 77 argv[0] = const_cast<char*>("chromotocol:name@chromoting.org"); | 77 argv[0] = const_cast<char*>("chromotocol:name@chromoting.org"); |
| 78 result = plugin_->New(mimetype, argc, argn, argv); | 78 result = plugin_->New(mimetype, argc, argn, argv); |
| 79 ASSERT_EQ(NPERR_NO_ERROR, result); | 79 ASSERT_EQ(NPERR_NO_ERROR, result); |
| 80 } | 80 } |
| 81 | 81 |
| 82 | |
| 83 static uint32 get_pixel(uint32* pixels, int stride, int x, int y) { | |
| 84 return pixels[((x) + ((y) * (stride >> 2)))]; | |
| 85 } | |
| 86 | |
| 87 TEST_F(ChromotingPluginTest, TestSetWindow) { | 82 TEST_F(ChromotingPluginTest, TestSetWindow) { |
| 88 NPWindow* window = fake_browser_->GetWindow(); | 83 NPWindow* window = fake_browser_->GetWindow(); |
| 89 NPError result; | 84 NPError result; |
| 90 | 85 |
| 91 result = plugin_->SetWindow(window); | 86 result = plugin_->SetWindow(window); |
| 92 ASSERT_EQ(NPERR_NO_ERROR, result); | 87 ASSERT_EQ(NPERR_NO_ERROR, result); |
| 93 } | 88 } |
| OLD | NEW |