summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-07 22:00:27 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-07 22:00:27 +0000
commit8aa3beab336b006d5accf47e0df89c715b41ad59 (patch)
treef264f7b1865fdbfabd51fbe6ed79d51a1d1a6820 /cc
parent61ace752b4c89d5faf3cd8ade2da7cd73c50e928 (diff)
downloadchromium_src-8aa3beab336b006d5accf47e0df89c715b41ad59.zip
chromium_src-8aa3beab336b006d5accf47e0df89c715b41ad59.tar.gz
chromium_src-8aa3beab336b006d5accf47e0df89c715b41ad59.tar.bz2
Fix SurfaceAggregatorWithResourcesTest.TakeResourcesOneSurface in libc++ builds.
The test no longer depends on the ordering of returned resources. BUG=391285 R=jamesr@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/371943004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281594 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/surfaces/surface_aggregator_unittest.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc
index 98e20ee..0a6b9bb 100644
--- a/cc/surfaces/surface_aggregator_unittest.cc
+++ b/cc/surfaces/surface_aggregator_unittest.cc
@@ -22,6 +22,7 @@
#include "cc/test/render_pass_test_common.h"
#include "cc/test/render_pass_test_utils.h"
#include "cc/test/test_shared_bitmap_manager.h"
+#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -875,9 +876,12 @@ TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) {
frame = aggregator_->Aggregate(surface_id);
ASSERT_EQ(3u, client.returned_resources().size());
+ ResourceProvider::ResourceId returned_ids[3];
for (size_t i = 0; i < 3; ++i) {
- EXPECT_EQ(ids[i], client.returned_resources()[i].id);
+ returned_ids[i] = client.returned_resources()[i].id;
}
+ EXPECT_THAT(returned_ids,
+ testing::WhenSorted(testing::ElementsAreArray(ids)));
factory.Destroy(surface_id);
}