summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/resource_request_body_unittest.cc3
-rw-r--r--webkit/glue/webcursor_unittest.cc3
-rw-r--r--webkit/glue/webkit_glue_unittest.cc27
-rw-r--r--webkit/tools/test_shell/test_shell.gypi9
4 files changed, 26 insertions, 16 deletions
diff --git a/webkit/glue/resource_request_body_unittest.cc b/webkit/glue/resource_request_body_unittest.cc
index fe0c136..62c5d70 100644
--- a/webkit/glue/resource_request_body_unittest.cc
+++ b/webkit/glue/resource_request_body_unittest.cc
@@ -8,6 +8,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
+#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
@@ -54,6 +55,7 @@ bool AreElementsEqual(const net::UploadElementReader& reader,
} // namespace
TEST(ResourceRequestBodyTest, CreateUploadDataStreamWithoutBlob) {
+ MessageLoop message_loop;
scoped_refptr<ResourceRequestBody> request_body = new ResourceRequestBody;
const char kData[] = "123";
@@ -90,6 +92,7 @@ TEST(ResourceRequestBodyTest, CreateUploadDataStreamWithoutBlob) {
}
TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
+ MessageLoop message_loop;
// Setup blob data for testing.
base::Time time1, time2;
base::Time::FromString("Tue, 15 Nov 1994, 12:45:26 GMT", &time1);
diff --git a/webkit/glue/webcursor_unittest.cc b/webkit/glue/webcursor_unittest.cc
index 27fc5c8..4ee0cd7 100644
--- a/webkit/glue/webcursor_unittest.cc
+++ b/webkit/glue/webcursor_unittest.cc
@@ -6,7 +6,6 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "webkit/glue/webcursor.h"
-#include "webkit/tools/test_shell/test_shell_test.h"
using WebKit::WebCursorInfo;
@@ -135,7 +134,7 @@ TEST(WebCursorTest, BrokenCursorSerialization) {
EXPECT_FALSE(custom_cursor.Deserialize(&iter));
}
-#if defined(OS_WIN)
+#if defined(OS_WIN) && !defined(USE_AURA)
TEST(WebCursorTest, WindowsCursorConversion) {
WebCursor custom_cursor;
Pickle win32_custom_pickle;
diff --git a/webkit/glue/webkit_glue_unittest.cc b/webkit/glue/webkit_glue_unittest.cc
index fb3a0ef..90fd31f 100644
--- a/webkit/glue/webkit_glue_unittest.cc
+++ b/webkit/glue/webkit_glue_unittest.cc
@@ -10,6 +10,7 @@
#include "base/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkColorPriv.h"
#include "webkit/glue/webkitplatformsupport_impl.h"
namespace {
@@ -33,10 +34,25 @@ TEST(WebkitGlueTest, DecodeImage) {
EXPECT_EQ(2, image.height());
EXPECT_EQ(SkBitmap::kARGB_8888_Config, image.config());
image.lockPixels();
- EXPECT_EQ(SK_ColorBLACK, *image.getAddr32(0, 0));
- EXPECT_EQ(SK_ColorRED, *image.getAddr32(1, 0));
- EXPECT_EQ(SK_ColorGREEN, *image.getAddr32(0, 1));
- EXPECT_EQ(SK_ColorBLUE, *image.getAddr32(1, 1));
+ uint32_t pixel = *image.getAddr32(0, 0); // Black
+ EXPECT_EQ(0x00U, SkGetPackedR32(pixel));
+ EXPECT_EQ(0x00U, SkGetPackedG32(pixel));
+ EXPECT_EQ(0x00U, SkGetPackedB32(pixel));
+
+ pixel = *image.getAddr32(1, 0); // Red
+ EXPECT_EQ(0xffU, SkGetPackedR32(pixel));
+ EXPECT_EQ(0x00U, SkGetPackedG32(pixel));
+ EXPECT_EQ(0x00U, SkGetPackedB32(pixel));
+
+ pixel = *image.getAddr32(0, 1); // Green
+ EXPECT_EQ(0x00U, SkGetPackedR32(pixel));
+ EXPECT_EQ(0xffU, SkGetPackedG32(pixel));
+ EXPECT_EQ(0x00U, SkGetPackedB32(pixel));
+
+ pixel = *image.getAddr32(1, 1); // Blue
+ EXPECT_EQ(0x00U, SkGetPackedR32(pixel));
+ EXPECT_EQ(0x00U, SkGetPackedG32(pixel));
+ EXPECT_EQ(0xffU, SkGetPackedB32(pixel));
image.unlockPixels();
}
@@ -98,6 +114,7 @@ class TestWebKitPlatformSupport
};
TEST(WebkitGlueTest, SuspendResumeSharedTimer) {
+ MessageLoop message_loop;
TestWebKitPlatformSupport platform_support;
// Set a timer to fire as soon as possible.
@@ -106,7 +123,7 @@ TEST(WebkitGlueTest, SuspendResumeSharedTimer) {
platform_support.SuspendSharedTimer();
// The above timer would have posted a task which can be processed out of the
// message loop.
- MessageLoop::current()->RunUntilIdle();
+ message_loop.RunUntilIdle();
// Set a mock time after 1 second to simulate timers suspended for 1 second.
double new_time = base::Time::Now().ToDoubleT() + 1;
platform_support.set_mock_monotonically_increasing_time(new_time);
diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi
index b3088ac..0a31a12 100644
--- a/webkit/tools/test_shell/test_shell.gypi
+++ b/webkit/tools/test_shell/test_shell.gypi
@@ -369,19 +369,10 @@
],
'sources': [
'../../glue/cpp_bound_class_unittest.cc',
- '../../glue/cpp_variant_unittest.cc',
'../../glue/dom_operations_unittest.cc',
'../../glue/dom_serializer_unittest.cc',
- '../../glue/glue_serialize_unittest.cc',
- '../../glue/multipart_response_delegate_unittest.cc',
- '../../glue/regular_expression_unittest.cc',
'../../glue/resource_fetcher_unittest.cc',
- '../../glue/resource_request_body_unittest.cc',
- '../../glue/touch_fling_gesture_curve_unittest.cc',
'../../glue/unittest_test_server.h',
- '../../glue/webcursor_unittest.cc',
- '../../glue/webkit_glue_unittest.cc',
- '../../glue/worker_task_runner_unittest.cc',
'../../mocks/mock_resource_loader_bridge.h',
'../../mocks/mock_webframeclient.h',
'../../mocks/mock_weburlloader.cc',