| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 "html>", | 389 "html>", |
| 390 baseURL); | 390 baseURL); |
| 391 EXPECT_EQ(kDarkCyan, webView->backgroundColor()); | 391 EXPECT_EQ(kDarkCyan, webView->backgroundColor()); |
| 392 | 392 |
| 393 FrameTestHelpers::loadHTMLString(webView->mainFrame(), | 393 FrameTestHelpers::loadHTMLString(webView->mainFrame(), |
| 394 "<html><head><style>body " | 394 "<html><head><style>body " |
| 395 "{background-color:rgba(255,0,0,0.5)}</" | 395 "{background-color:rgba(255,0,0,0.5)}</" |
| 396 "style></head></html>", | 396 "style></head></html>", |
| 397 baseURL); | 397 baseURL); |
| 398 // Expected: red (50% alpha) blended atop base of kBlue. | 398 // Expected: red (50% alpha) blended atop base of kBlue. |
| 399 EXPECT_EQ(0xFF7F0080, webView->backgroundColor()); | 399 EXPECT_EQ(0xFF80007F, webView->backgroundColor()); |
| 400 | 400 |
| 401 webView->setBaseBackgroundColor(kTranslucentPutty); | 401 webView->setBaseBackgroundColor(kTranslucentPutty); |
| 402 // Expected: red (50% alpha) blended atop kTranslucentPutty. Note the alpha. | 402 // Expected: red (50% alpha) blended atop kTranslucentPutty. Note the alpha. |
| 403 EXPECT_EQ(0xBFE93B32, webView->backgroundColor()); | 403 EXPECT_EQ(0xBFE93A31, webView->backgroundColor()); |
| 404 | 404 |
| 405 webView->setBaseBackgroundColor(kTransparent); | 405 webView->setBaseBackgroundColor(kTransparent); |
| 406 FrameTestHelpers::loadHTMLString(webView->mainFrame(), | 406 FrameTestHelpers::loadHTMLString(webView->mainFrame(), |
| 407 "<html><head><style>body " | 407 "<html><head><style>body " |
| 408 "{background-color:transparent}</style></" | 408 "{background-color:transparent}</style></" |
| 409 "head></html>", | 409 "head></html>", |
| 410 baseURL); | 410 baseURL); |
| 411 // Expected: transparent on top of kTransparent will still be transparent. | 411 // Expected: transparent on top of kTransparent will still be transparent. |
| 412 EXPECT_EQ(kTransparent, webView->backgroundColor()); | 412 EXPECT_EQ(kTransparent, webView->backgroundColor()); |
| 413 | 413 |
| (...skipping 3968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4382 EXPECT_EQ(expectedWidth, vwElement->offsetWidth()); | 4382 EXPECT_EQ(expectedWidth, vwElement->offsetWidth()); |
| 4383 EXPECT_EQ(expectedHeight, vwElement->offsetHeight()); | 4383 EXPECT_EQ(expectedHeight, vwElement->offsetHeight()); |
| 4384 | 4384 |
| 4385 webView->resize(WebSize(800, 600)); | 4385 webView->resize(WebSize(800, 600)); |
| 4386 frame->printEnd(); | 4386 frame->printEnd(); |
| 4387 | 4387 |
| 4388 EXPECT_EQ(800, vwElement->offsetWidth()); | 4388 EXPECT_EQ(800, vwElement->offsetWidth()); |
| 4389 } | 4389 } |
| 4390 | 4390 |
| 4391 } // namespace blink | 4391 } // namespace blink |
| OLD | NEW |