summaryrefslogtreecommitdiffstats
path: root/ui/compositor/test/test_layers.cc
blob: 2e71eac70b1e903d55684f0607bdc001a2310192 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/compositor/test/test_layers.h"

#include "ui/compositor/layer.h"

namespace ui {
namespace test {

std::string ChildLayerNamesAsString(const ui::Layer& parent) {
  std::string names;
  for (std::vector<Layer*>::const_iterator it = parent.children().begin();
       it != parent.children().end(); ++it) {
    if (!names.empty())
      names += " ";
    names += (*it)->name();
  }
  return names;
}

}  // namespace test
}  // namespace ui