Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 2629163002: Revert of Fix RGBA alpha parsing and serialization to adhere to W3 standard. (Closed)
Patch Set: fix conflicts Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Color.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 "html>", 388 "html>",
389 baseURL); 389 baseURL);
390 EXPECT_EQ(kDarkCyan, webView->backgroundColor()); 390 EXPECT_EQ(kDarkCyan, webView->backgroundColor());
391 391
392 FrameTestHelpers::loadHTMLString(webView->mainFrame(), 392 FrameTestHelpers::loadHTMLString(webView->mainFrame(),
393 "<html><head><style>body " 393 "<html><head><style>body "
394 "{background-color:rgba(255,0,0,0.5)}</" 394 "{background-color:rgba(255,0,0,0.5)}</"
395 "style></head></html>", 395 "style></head></html>",
396 baseURL); 396 baseURL);
397 // Expected: red (50% alpha) blended atop base of kBlue. 397 // Expected: red (50% alpha) blended atop base of kBlue.
398 EXPECT_EQ(0xFF80007F, webView->backgroundColor()); 398 EXPECT_EQ(0xFF7F0080, webView->backgroundColor());
399 399
400 webView->setBaseBackgroundColor(kTranslucentPutty); 400 webView->setBaseBackgroundColor(kTranslucentPutty);
401 // Expected: red (50% alpha) blended atop kTranslucentPutty. Note the alpha. 401 // Expected: red (50% alpha) blended atop kTranslucentPutty. Note the alpha.
402 EXPECT_EQ(0xBFE93A31, webView->backgroundColor()); 402 EXPECT_EQ(0xBFE93B32, webView->backgroundColor());
403 403
404 webView->setBaseBackgroundColor(kTransparent); 404 webView->setBaseBackgroundColor(kTransparent);
405 FrameTestHelpers::loadHTMLString(webView->mainFrame(), 405 FrameTestHelpers::loadHTMLString(webView->mainFrame(),
406 "<html><head><style>body " 406 "<html><head><style>body "
407 "{background-color:transparent}</style></" 407 "{background-color:transparent}</style></"
408 "head></html>", 408 "head></html>",
409 baseURL); 409 baseURL);
410 // Expected: transparent on top of kTransparent will still be transparent. 410 // Expected: transparent on top of kTransparent will still be transparent.
411 EXPECT_EQ(kTransparent, webView->backgroundColor()); 411 EXPECT_EQ(kTransparent, webView->backgroundColor());
412 412
(...skipping 3939 matching lines...) Expand 10 before | Expand all | Expand 10 after
4352 frame->printBegin(printParams, WebNode()); 4352 frame->printBegin(printParams, WebNode());
4353 webView->resize(WebSize(500, 500)); 4353 webView->resize(WebSize(500, 500));
4354 EXPECT_EQ(500, vwElement->offsetWidth()); 4354 EXPECT_EQ(500, vwElement->offsetWidth());
4355 4355
4356 webView->resize(WebSize(800, 600)); 4356 webView->resize(WebSize(800, 600));
4357 frame->printEnd(); 4357 frame->printEnd();
4358 EXPECT_EQ(800, vwElement->offsetWidth()); 4358 EXPECT_EQ(800, vwElement->offsetWidth());
4359 } 4359 }
4360 4360
4361 } // namespace blink 4361 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/Color.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698