| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 "html>", | 387 "html>", |
| 388 baseURL); | 388 baseURL); |
| 389 EXPECT_EQ(kDarkCyan, webView->backgroundColor()); | 389 EXPECT_EQ(kDarkCyan, webView->backgroundColor()); |
| 390 | 390 |
| 391 FrameTestHelpers::loadHTMLString(webView->mainFrame(), | 391 FrameTestHelpers::loadHTMLString(webView->mainFrame(), |
| 392 "<html><head><style>body " | 392 "<html><head><style>body " |
| 393 "{background-color:rgba(255,0,0,0.5)}</" | 393 "{background-color:rgba(255,0,0,0.5)}</" |
| 394 "style></head></html>", | 394 "style></head></html>", |
| 395 baseURL); | 395 baseURL); |
| 396 // Expected: red (50% alpha) blended atop base of kBlue. | 396 // Expected: red (50% alpha) blended atop base of kBlue. |
| 397 EXPECT_EQ(0xFF7F0080, webView->backgroundColor()); | 397 EXPECT_EQ(0xFF80007F, webView->backgroundColor()); |
| 398 | 398 |
| 399 webView->setBaseBackgroundColor(kTranslucentPutty); | 399 webView->setBaseBackgroundColor(kTranslucentPutty); |
| 400 // Expected: red (50% alpha) blended atop kTranslucentPutty. Note the alpha. | 400 // Expected: red (50% alpha) blended atop kTranslucentPutty. Note the alpha. |
| 401 EXPECT_EQ(0xBFE93B32, webView->backgroundColor()); | 401 EXPECT_EQ(0xBFE93A31, webView->backgroundColor()); |
| 402 | 402 |
| 403 webView->setBaseBackgroundColor(kTransparent); | 403 webView->setBaseBackgroundColor(kTransparent); |
| 404 FrameTestHelpers::loadHTMLString(webView->mainFrame(), | 404 FrameTestHelpers::loadHTMLString(webView->mainFrame(), |
| 405 "<html><head><style>body " | 405 "<html><head><style>body " |
| 406 "{background-color:transparent}</style></" | 406 "{background-color:transparent}</style></" |
| 407 "head></html>", | 407 "head></html>", |
| 408 baseURL); | 408 baseURL); |
| 409 // Expected: transparent on top of kTransparent will still be transparent. | 409 // Expected: transparent on top of kTransparent will still be transparent. |
| 410 EXPECT_EQ(kTransparent, webView->backgroundColor()); | 410 EXPECT_EQ(kTransparent, webView->backgroundColor()); |
| 411 | 411 |
| (...skipping 3881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4293 .translate(50, 55) | 4293 .translate(50, 55) |
| 4294 .scale(1. / 2.f); | 4294 .scale(1. / 2.f); |
| 4295 EXPECT_EQ(expectedMatrix, | 4295 EXPECT_EQ(expectedMatrix, |
| 4296 webViewImpl->getDeviceEmulationTransformForTesting()); | 4296 webViewImpl->getDeviceEmulationTransformForTesting()); |
| 4297 // visibleContentRect doesn't change. | 4297 // visibleContentRect doesn't change. |
| 4298 EXPECT_EQ(IntRect(50, 55, 50, 75), | 4298 EXPECT_EQ(IntRect(50, 55, 50, 75), |
| 4299 *devToolsEmulator->visibleContentRectForPainting()); | 4299 *devToolsEmulator->visibleContentRectForPainting()); |
| 4300 } | 4300 } |
| 4301 | 4301 |
| 4302 } // namespace blink | 4302 } // namespace blink |
| OLD | NEW |